# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=alligator
pkgver=0_git20201101
pkgrel=0
_commit="7d75c6cf9b0f5d337f0bac4a700ec94c2adacc49"
pkgdesc="A convergent RSS/Atom feed reader"
url="https://invent.kde.org/tfella/alligator/"
arch="all !armhf"
license="LicenseRef-KDE-Accepted-GPL"
depends="
	kirigami2
	qt5-qtbase-sqlite
	"
makedepends="
	extra-cmake-modules
	kconfig-dev
	kcoreaddons-dev
	ki18n-dev
	qt5-qtbase-dev
	qt5-qtquickcontrols2-dev
	syndication-dev
	"
source="https://invent.kde.org/plasma-mobile/alligator/-/archive/$_commit/alligator-$_commit.tar.gz"
options="!check" # No tests
builddir="$srcdir/$pkgname-$_commit"

prepare() {
	default_prepare

	# qmlplugindump fails for armv7+qemu (pmb#1970). This is purely for
	# packager knowledge and doesn't affect runtime, so we can disable it.
	if [ "$CARCH" = "armv7" ]; then
		sed -i "s/ecm_find_qmlmodule/# ecm_find_qmlmodule/g" CMakeLists.txt
	fi
}

build() {
	cmake -B build \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

package() {
	DESTDIR="$pkgdir" cmake --build build --target install
}

sha512sums="ef5a7b9d749c796ad91f887bd9f7ce5da40b3f02cb434d7e91260c49d26bc3876335b071e0f7a022b957deb3241531743f46f46a3fa4e1160f37e22a28a71964  alligator-7d75c6cf9b0f5d337f0bac4a700ec94c2adacc49.tar.gz"
